package demo;

import observer.Manager;

/**
 * 测试类
 */
public class Demo {

    public static void main(String[] args) {
        // 注册消息接收者
        MessageReceiver messageReceiver = new MessageReceiver();
        messageReceiver.init();

        // 产生消息
        Source source = new Source();
        source.init();

        Manager.getInstance().close();

        // 产生消息
        source = new Source();
        source.init();
    }
}
